//
//  XL_MineViewController.m
//  OnePointDemo
//
//  Created by 薛磊 on 2018/7/3.
//  Copyright © 2018年 XL. All rights reserved.
//

#import "XL_MineViewController.h"

@interface XL_MineViewController ()

@end

@implementation XL_MineViewController

-(NSMutableArray *)sourceArrayM{
    
    return @[@[@{@"title":@"我的订单",@"image":@"myAppointment"},
                          @{@"title":@"体检报告",@"image":@"account_security"}],
                     @[@{@"title":@"健康二维码",@"image":@"account_security"},
                          @{@"title":@"用户管理",@"image":@"group_chat_icon"},
                          @{@"title":@"个人运动",@"image":@"vedio_green"}],
                     @[@{@"title":@"设置",@"image":@"account_security"},
                          @{@"title":@"分享",@"image":@"fengxiang"},
                          @{@"title":@"关于",@"image":@"about"}],].mutableCopy;
    
}

-(void)jp_setupUI{
    [super jp_setupUI];
}
-(void)jp_requestData{
    [super jp_requestData];
    [self.tableView reloadData];
}

#pragma mark -TableViewDataSouce-
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
  
    NSArray * arr = self.sourceArrayM[section];
    
    return arr.count;
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return self.sourceArrayM.count;
}
#pragma mark -TableViewDelegate-
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    NSDictionary * dic =self.sourceArrayM[indexPath.section][indexPath.row];
    
    JPBaseCell * cell = [JPBaseCell jp_cellForTableView:tableView];
    
    cell.textLabel.text =[dic objectForKey:@"title"];
    
    cell.imageView.image = [UIImage imageNamed:[dic objectForKey:@"image"]];
    
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
    return cell;
}

-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 10;
}
@end
